<template>
	<view class="timelineItem" v-if="!end">
		<view class="timeItem" v-if="!end">
			<image class="leftTime" :src="avatar" >
				
			</image>
			
			<view class="line" v-if="!end">
				<image class="out" :src="image">
					
				</image>
			</view>
			
			<view class="noline" v-if="end">
				<image class="out" :src="image">
					
				</image>
			</view>
			
			<view class="rightContent">
				<slot></slot>
			</view>
		</view>
		
	</view>
	
	
	
	<view class="timelineItem-end" v-if="end">
	
	<view class="timeItem">
		<image class="leftTime" :src="avatar">
			
		</image>
		
		<view class="line" v-if="!end">
			<image class="out" :src="image">
				
			</image>
		</view>
		
		<view class="noline" v-if="end">
			<image class="out" :src="image">
				
			</image>
		</view>
		
		<view class="rightContent">
			<slot></slot>
		</view>
	</view>
		
	</view>

</template>

<script>
	export default {
		props:{
			end:{
				type:Boolean,
				default: false
			},
			image:{
				type:String,
				default:''
			},
			avatar:{
				type:String,
				default:''
			},
			leftTime:{
				type:String,
				default:''
			},
			color:{
				type:String,
				default:''
			}
		},
		data(){
			return {
				
			}
		}
	}
</script>

<style scoped lang="less">
	
	
	.timelineItem-end {
		height: 144rpx;	
		.timeItem{
			height: 144rpx;
			display: flex;
			.leftTime {
				border: 2rpx solid black;
				width: 80rpx;
				height: 80rpx;
				font-size:22rpx;
				font-family:PingFangSC-Medium,PingFang SC;
				font-weight:500;
				color:rgba(51,51,51,1);
				margin-right: 36rpx;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
				border-radius: 100%;
			}
			.line {
				width: 1px;
				top: 26rpx;
				background: #E6E6E6;;
				position: relative;
				z-index: 1;
				.out {
					position: absolute;
					top: 0;
					left: 50%;
					transform: translateX(-50%);
					display: flex;
					justify-content: center;
					align-items: center;
					width: 28rpx;
					height: 28rpx;
					border-radius: 50%;
					z-index: 10;
					background-color: transparent;
					.inner {
						width: 18rpx;
						height: 18rpx;
						background : rgba(236,104,23,1);
						border-radius: 50%;
					}
				}
			}
			.noline{
				width: 0px;
				background: #E6E6E6;;
				position: relative;
				z-index: 1;
				.out {
					position: absolute;
					top: 26rpx;
					left: 50%;
					transform: translateX(-50%);
					display: flex;
					justify-content: center;
					align-items: center;
					width: 28rpx;
					height: 28rpx;
					border-radius: 50%;
					z-index: 10;
					background-color: transparent;
					.inner {
						width: 18rpx;
						height: 18rpx;
						background : rgba(236,104,23,1);
						border-radius: 50%;
					}
				}
			}
			.rightContent {
				flex: 1;
				padding: 0 10rpx 40rpx;
				margin-left: 63rpx;
				min-height: 50rpx;
			}
		}
	
	}
	
	.timelineItem{
		height: 230rpx;
		.timeItem {
			height: 230rpx;
			display: flex;
			.leftTime {
				border: 2rpx solid black;
				width: 80rpx;
				height: 80rpx;
				font-size:22rpx;
				font-family:PingFangSC-Medium,PingFang SC;
				font-weight:500;
				color:rgba(51,51,51,1);
				margin-right: 36rpx;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
				border-radius: 100%;
			}
			.line {
				width: 1px;
				top: 26rpx;
				background: #E6E6E6;;
				position: relative;
				z-index: 1;
				.out {
					position: absolute;
					top: 0;
					left: 50%;
					transform: translateX(-50%);
					display: flex;
					justify-content: center;
					align-items: center;
					width: 28rpx;
					height: 28rpx;
					border-radius: 50%;
					z-index: 10;
					background-color: transparent;
					.inner {
						width: 18rpx;
						height: 18rpx;
						background : rgba(236,104,23,1);
						border-radius: 50%;
					}
				}
			}
			.noline{
				width: 0px;
				background: #E6E6E6;;
				position: relative;
				z-index: 1;
				.out {
					position: absolute;
					top: 26rpx;
					left: 50%;
					transform: translateX(-50%);
					display: flex;
					justify-content: center;
					align-items: center;
					width: 28rpx;
					height: 28rpx;
					border-radius: 50%;
					z-index: 10;
					background-color: transparent;
					.inner {
						width: 18rpx;
						height: 18rpx;
						background : rgba(236,104,23,1);
						border-radius: 50%;
					}
				}
			}
			.rightContent {
				flex: 1;
				padding: 0 10rpx 40rpx;
				margin-left: 63rpx;
				min-height: 50rpx;
			}
		}
	}
	
	
</style>
